package com.yuju.hotel.enums;
/**
 * 
 * 类名：CheckinStandardReturnCodeEnum  <br />
 *
 * 功能：入住标准相关枚举
 *
 * @author : zhousc <br />
 * @Date : 2017年11月29日 下午3:03:00  <br />
 * @version : 1.1 <br />
 */
public enum CheckinStandardReturnCodeEnum {
	CHECKINSTANDARD_QUERY_SUCCESS("yuju-checkinStandard-1000", "入住标准查询成功"),
	CHECKINSTANDARD_QUERY_FAILURE("yuju-checkinStandard-1001", "入住标准查询失败"),
	CHECKINSTANDARD_SAVE_SUCCESS("yuju-checkinStandard-1002", "入住标准保存成功"),
	CHECKINSTANDARD_SAVE_FAILURE("yuju-checkinStandard-1003", "入住标准保存失败"),
	CHECKINSTANDARD_UPDATE_SUCCESS("yuju-checkinStandard-1004", "入住标准更新成功"),
	CHECKINSTANDARD_UPDATE_FAILURE("yuju-checkinStandard-1005", "入住标准更新失败"),
	CHECKINSTANDARD_DEL_SUCCESS("yuju-checkinStandard-1006", "入住标准删除成功"),
	CHECKINSTANDARD_DEL_FAILURE("yuju-checkinStandard-1007", "入住标准删除失败"),
	CHECKINSTANDARD_VALID_SUCCESS("yuju-checkinStandard-1008", "校检成功"),
	CHECKINSTANDARD_VALID_FAILURE("yuju-checkinStandard-1009", "校检失败");
	
	
	private String code;
	private String desc;
	
	CheckinStandardReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (FloorReturnCodeEnum enume : FloorReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}